﻿<%@ Page Language="C#" MasterPageFile="~/Admin/Admin.master" AutoEventWireup="true" ValidateRequest="false" CodeBehind="ArticleCatalogManage.aspx.cs" Inherits="XinBang.Web.Admin.ArticleCatalogManage" Title="无标题页" %>
<asp:Content ID="Content1" ContentPlaceHolderID="headerplace" Runat="Server">

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="mainplace" Runat="Server">
<h2><asp:Literal ID="ttitle" runat="server" Text="成绩查询"></asp:Literal></h2>
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" DataObjectTypeName="XinBang.Entity.ArticleCatalog"
        SelectMethod="GetAllCatalogs" TypeName="XinBang.BLL.ArticleCatalogBL" DeleteMethod="DeleteCatalog" UpdateMethod="UpdateCatalog" OnUpdated="UpdatedCatalog" OnUpdating="UpdatingCatalog" OnDeleted="DeletedCatalog" OnDeleting="DeletingCatalog">
    </asp:ObjectDataSource>
    <asp:MultiView ID="MultiView1" runat="server">
        <asp:View ID="View1" runat="server">
            <asp:GridView ID="list" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                DataSourceID="ObjectDataSource1" DataKeyNames="Catid"  PageSize="16" CssClass="show">
                <Columns>
                    <asp:BoundField DataField="Catid" HeaderText="编号" SortExpression="Catid" ReadOnly="True" >
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:TemplateField HeaderText="栏目"  SortExpression="Catid">
                        <ItemTemplate>
                            <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# Eval("Catid", "ArticleManage.aspx?action=list&catid={0}") %>'
                                Text='<%# Eval("CataLogName", "{0}") %>'></asp:HyperLink>
                        </ItemTemplate>
                        <EditItemTemplate>
                            <asp:textbox id="cat" text='<%# Bind("CataLogName")%>' runat="server"/>
                        </EditItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="Note"  HeaderText="备注" SortExpression="Note" />
                    <asp:TemplateField HeaderText="操作" >
                        <ItemTemplate>
                            <asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" CommandName="Edit"
                        Text="编辑"></asp:LinkButton>
                            <asp:LinkButton ID="DeleteButton" runat="server" CausesValidation="False" CommandName="Delete"
                        Text="删除"></asp:LinkButton>
                        </ItemTemplate>
                        <EditItemTemplate>
                            <asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" CommandName="Update"
                        Text="更新"></asp:LinkButton>
                    <asp:LinkButton ID="InsertCancelButton" runat="server" CausesValidation="False" CommandName="Cancel"
                        Text="取消"></asp:LinkButton>
                        </EditItemTemplate>
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:TemplateField>
                </Columns>
                <EmptyDataTemplate>
                    还没有栏目,<a href="ArticleCatalogManage.aspx?action=add">添加栏目</a>
                </EmptyDataTemplate>
                <AlternatingRowStyle CssClass="alt" />
                <PagerStyle CssClass="pager" />
                <PagerSettings FirstPageText="首页" LastPageText="末页" Mode="NextPreviousFirstLast"
                    NextPageText="下一页" PreviousPageText="上一页" />
            </asp:GridView>
            <div class="bott_button">
                <asp:LinkButton ID="addcatalog" runat="server" OnClick="addcatalog_Click">添加栏目</asp:LinkButton>
            </div>
        </asp:View>
        <asp:View ID="View2" runat="server">
            <table class="show">
                <tr><td>
                    <asp:HiddenField ID="CatalogId" runat="server" />
                    栏目名称:<asp:TextBox ID="CatnameTextBox" runat="server" Text="" Columns="20"></asp:TextBox>
                    栏目备注:<asp:TextBox ID="NoteTextBox" runat="server" Text="" ToolTip="备注" Columns="40"></asp:TextBox>
                    <asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True"
                        Text="插入" OnClick="InsertButton_Click"></asp:LinkButton>
                    <asp:LinkButton ID="InsertCancelButton" runat="server" CausesValidation="False"
                        Text="取消"></asp:LinkButton>
                </td></tr>
            </table>            
            <div class="bott_button">
                <asp:LinkButton ID="Manager" runat="server" OnClick="Manager_Click">管理栏目</asp:LinkButton>
            </div>
        </asp:View>
    </asp:MultiView>
</asp:Content>